﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Models;
namespace BLL
{
    public class BLLCMS_User
    {
        DALCMS_User DALCMS_User = new DALCMS_User();
        public static string GetPageCMS_Articles(int pageindex, int pagesize, string Uanem)
        {
            return DALCMS_User.GetPageCMS_Articles(pageindex, pagesize, Uanem);
        }
        //public List<CMS_User> GetCMS_Users()
        //{
        //    return DALCMS_User.GetCMS_Users();
        //}
        public static List<CMS_User> GetCMS_UserAll()
        {
            return DALCMS_User.GetCMS_UserAll();
        }
        //查询全部
        public static List<CMS_User> GetCMS_UserAllWhere(string Uname)
        {
            return DALCMS_User.GetCMS_UserAllWhere(Uname);
        }
        public static CMS_User login(string name, string pwd)
        {
            return DALCMS_User.login(name, pwd);
        }
        //登录
        public static int Login(string Uname, string upwd)
        {
            int count = DALCMS_User.Login(Uname, upwd);
            return count;

        }
        //添加
        public static int Insert(CMS_User c)
        {
            return DALCMS_User.Insert(c);
        }
        //单值查询
        public static List<CMS_User> Selectid(int id)
        {
            return DALCMS_User.Selectid(id);
        }
        //修改
        public static int update(int id, string uname, string upwd, string nname, string mobile, string face, bool admin)
        {
            return DALCMS_User.update(id, uname, upwd, nname, mobile, face, admin);
        }
        //删除
        public static int Datete(int id)
        {
            return DALCMS_User.Datete(id);
        }
    }
}